﻿using BCCommon;
using BCDto.Common.News.NewsContentComment;
using BCDto.Website.User;
using System;

namespace BCService.Common.News.NewsContentCommentService
{
    /// <summary>
    /// 新闻评论服务接口
    /// </summary>
    public interface INewsContentCommentService
    {
        /// <summary>
        /// 获取新闻评论列表（分页）
        /// </summary>
        /// <param name="newsContentId">新闻内容Id</param>
        /// <param name="index">当前页码</param>
        /// <param name="size">每页数据条数</param>
        /// <param name="userId">用户Id</param>
        /// <returns></returns>
        PageableList<NewsContentCommentDto> GetList(long newsContentId,int index, int size, int? userId);
        /// <summary>
        /// 添加新闻评论
        /// </summary>
        /// <param name="current">当前用户</param>
        /// <param name="dto">新闻评论</param>
        /// <returns></returns>
        NewsContentCommentDto Create(UserDto current, NewsContentCommentRequestDto dto);
        /// <summary>
        /// 获取新闻评论
        /// </summary>
        /// <param name="newsContentCommentId">文章评论Id</param>
        /// <returns></returns>
        NewsContentCommentDto Get(long newsContentCommentId);
        /// <summary>
        /// 获取子级评论回复
        /// </summary>
        /// <param name="newsContentId">新闻Id</param>
        /// <param name="newsContentCommentId">新闻评论Id</param>
        /// <param name="index">当前页码</param>
        /// <param name="size">每页数据条数</param>
        /// <returns></returns>
        PageableList<NewsContentCommentDto> GetChildrenCommentByCommentId(long newsContentId, long newsContentCommentId, int index, int size);
        /// <summary>
        /// 分页获取所有新闻评价信息列表
        /// </summary>
        /// <param name="title">文章标题</param>
        /// <param name="comment">文章评论</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="ascending">排序</param>
        /// <param name="index">当前页</param>
        /// <param name="size">每页条数</param>
        /// <returns></returns>
        PageableList<NewsContentCommentDto> GetAllNewsContentCommentList(string title, string comment, DateTime? start,DateTime? end,bool? ascending, int index, int size);
        /// <summary>
        /// 修改新闻评论点赞数量
        /// </summary>
        /// <param name="newsContentCommentId">新闻评论Id</param>
        /// <param name="isAdd">增加或减少</param>
        NewsContentCommentDto UpdateCommentLikeCount(long newsContentCommentId, bool isAdd);
        /// <summary>
        /// 删除新闻评论
        /// </summary>
        /// <param name="newsContentCommentId">新闻评论Id</param>
        void Delete(long newsContentCommentId);

        /// <summary>
		/// 启用新闻内容评论
		/// </summary>
		/// <param name="newsContentCommentId">新闻内容评论Id</param>
		bool Enabled(long newsContentCommentId);
        /// <summary>
        /// 禁用新闻内容评论
        /// </summary>
        /// <param name="newsContentCommentId">新闻内容评论Id</param>
        bool Disabled(long newsContentCommentId);
    }
}
